if word exist in string

140

if word exist in string -

$a = 'How are you?';

if (strpos($a, 'are') !== false) {
    echo 'true';
}

Comments

Submit
0 Comments